ci: consolidate improvements — paths, validate-pr action, fetch-depth, continue-on-error#2047
Merged
Conversation
When matrix jobs are skipped, `${{ matrix.name }}` is never expanded,
showing literal "matrix.name" in the checks UI. Removing the `name:`
field lets GitHub use the job ID when skipped and auto-expand matrix
values when running.
Only 5 of 3,943 unit tests need Java, and they already have skip_if_maven_not_available() guards. Java execution is validated by the e2e-java job. Saves ~30-60s per matrix entry (7 entries).
Run ruff check --fix and ruff format before prek validation. If files were modified, commit and push the fixes automatically.
Expand e2e_java and e2e_js change detection to include shared pipeline code (optimization/, verification/, languages/base.py) but decouple from the broad e2e flag. A change to codeflash/version.py now only triggers Python E2Es, not Java/JS E2Es.
- Remove codeflash-java-runtime/ from unit_tests change detection - Narrow e2e flag from codeflash/ to explicit Python subdirs (excludes java/, javascript/) - Narrow tests/ in e2e_java/e2e_js to specific test scripts - Extract duplicated Validate PR step into composite action - Use fetch-depth: 1 for unit-tests and type-check (no git history needed) - Remove continue-on-error: true from unit-tests (was masking real failures) - Change git add -A to git add -u in prek auto-fix (won't stage untracked files)
The requires_java marker only checked for java binary but the tests also need mvn to build the codeflash-runtime JAR. These 13 tests were silently failing in unit-tests (masked by continue-on-error).
Ubuntu runners have Java/Maven pre-installed, so checking for java/mvn binaries doesn't skip. The actual dependency is the codeflash-runtime JAR which must be built from codeflash-java-runtime/ via Maven.
Same fix as test_comparator.py — uses _find_comparator_jar() to skip when the codeflash-runtime JAR isn't built. Fixes Windows unit-tests which don't have Java pre-installed (unlike Linux runners).
Apply @requires_java_runtime to TestJavaRunAndParseBehavior and TestJavaRunAndParsePerformance at the class level. The performance test was failing on Windows with a flaky 10ms timing assertion (10.515ms actual, 5% tolerance) — pre-existing issue masked by continue-on-error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Batch of CI improvements to the consolidated
ci.yaml:codeflash-java-runtime/from unit_tests detection — Java runtime changes are validated bye2e-java, not unit testse2eflag fromcodeflash/to explicit Python subdirs — excludeslanguages/java/andlanguages/javascript/which have their own E2E jobstests/ine2e_java/e2e_jstotests/scripts/end_to_end_test_java*/..._js*— avoids triggering language E2Es on unrelated test changes.github/actions/validate-pr/action.yml) — single source of truth, was duplicated 3× across E2E jobsfetch-depth: 1for unit-tests and type-check — these jobs don't need git history, saves checkout timecontinue-on-error: truefrom unit-tests — was silently masking real failures in the matrixgit add -uinstead ofgit add -Ain prek — only stages modified tracked files, won't accidentally commit untracked filesname: ${{ matrix.name }}from matrix jobs — prevents literalmatrix.namein GitHub UI when jobs are skippedskip_if_maven_not_available()guardsTest plan